package com.example.crypt;

public class CryptToolFactory {

    /**
     * 获取加密方法实例
     */
    public static ICrypt getInstance() {
        return getInstance(CryptType.AES);
    }

    /**
     * 获取加密方法实例
     */
    public static ICrypt getInstance(CryptType type) {
        return CryptTool.getInstance(type);
    }

    public static enum CryptType {
        RSA("rsa加密"),
        DES("des加密"),
        AES("aes加密");

        String str;

        private CryptType(String s) {
            this.str = s;
        }

        public String toString() {
            return str;
        }
    }
}
